package com.itheima.SingleInstanc2;

public class Smartcontrol {
    public void control(JD jd){
        System.out.println("Smart control " + jd.getName()+""+jd.getFlag());
        jd.press();
    }
    public void printALL(JD[] jds){
        for (JD jd : jds) {
            System.out.println(jd.getName()+""+jd.getFlag());
        }
    }
}
